<?php
/**
 * 语言列表
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2019/5/28 14:36
 * @copyright PanxSoft Inc.
 */

namespace App\Http\Controllers\Common;


use App\Http\Controllers\ApiController;
use App\Models\Language;

class LanguageController extends ApiController
{
    const ROUTES = [
        'index' => 'api.common.language.index',
    ];

    public function index()
    {
        $languages = (new Language)
            ->oldest('sort_order')
            ->where('is_show', Language::IS_SHOW)
            ->get();

        return $this->response(compact('languages'));
    }
}